function get(url) {
	wx.showLoading({
		title: '加载中',
	})
	return new Promise((resolve, reject) => {
		wx.request({
			url,
			success: (res) => {
				// 关闭loading
				wx.hideLoading()
				resolve(res)
			}
		})
	})
}
function post(url, header, params) {
 return new Promise((resolve, reject) => {
  wx.request({
   url,
   header,
   data: params,
   method: 'POST',
   success: (res) => {
    resolve(res)
   }
  })

 })
}

export default {
	get,post
}
